@echo off

rem Conan output directory
set conan_target="Targets\ConanFiles\%1"

rem CMake output directory
set build_target="Targets\%1"

rem install conan dependencies
conan install . --install-folder %conan_target% --build missing -s build_type=%1 -c tools.system.package_manager:mode=install

rem generate cmake build files
cmake -S . -B %build_target% -DCMAKE_BUILD_TYPE=%1 -DCMAKE_TOOLCHAIN_FILE=%conan_target%\conan_toolchain.cmake

rem compile cmake build files using parallel jobs
cmake --build %build_target% --config %1 -- -m:40
